Many "Western" countries provide travel advice to their citizens. To give some English-language examples, the US state department provides ongoing events alerts here as well as more general, less frequently updated advice about travel to a country. The UK's Foreign and Commonwealth Office also provides a very complete advice page for pretty much all countries of the world. "Travel Advice" seems to be the english language search term.
Each FCO country page consists of several sections. The initial landing page, provides a general overview of the country in question, and may contain a map like this:
Image by the Foreign and Commonwealth Office, available under the OGL License
Which indicates different levels of perceived hazard in different regions of the country, between "See travel advice", "advise against all but essential travel" and "advise against all travel". Sometimes an entire country may be issued with one of the higher level warnings.
The rest of the page for each country covers these areas
- Safety and security
- Local laws and customs
- Entry requirements
Emphasis is mine on those sections that may be relevant to safety concerns. To their credit, the FCO advice on safety often makes a point of considering the relative danger of travel (road especially, but also other forms) and popular tourists attractions, which in the vast majority of destinations represent a much greater threat to travellers than the (thankfully rare) incidents of terrorism.
Another issue which deserves attention is concerns about infectious diseases - along with the dangers of road travel, these tend to be a more significant cause of hazard to travellers than violence. The FCO site will point towards the current UK website for such information (it seems to change quite often). The US CDC also provides a useful page for regarding health concerns. Where possible, try to find health advice from government agencies of your nation, as it will be tailored to the vaccination schedule and typically encountered hazards in your environment, rather than others.
With all these risks, it can be useful to compare to advice given regarding your own place of residence - it may be that despite warnings, it is safer at your intended destination (in some ways at least) than at home. For example, most US residents will find the rate of deaths and serious injuries from road collisions much lower across many potential destinations, especially western Europe. Equally, even in some areas of elevated terrorism risk, the risk from other violent crime can be much lower than some areas considered safe from terrorism.
Finally, it is worth noting that despite all this available advice and planning, terrorism especially, much like natural disasters, are difficult to predict. There are more frequent (and damaging) in some places than others, but none of these sources of advice are omniscient, and inevitably a lot of the advice they provide is reactive. It is ultimately upon the traveller themselves to assess the risks they will face when travelling, compare them to the risks they take at home, and make a judgement about what level of hazard is acceptable to them personally. Remember there is no such thing as strictly "safe" or "unsafe" - merely different levels of risk (and consequence), and the sober assessment of such risks may differ considerably from immediate emotional assessment. (Most people tend to dramatically over-prioritize risk from violence, and dramatically under-prioritize transport risks, for example.)