Portugal ranks 3rd as the safest country in the world. As long as common sense measures are taken, there is no reason why there should be any concerns on this matter.
Rates for violent crime, like conflicts, gang-related crime or drug issues, are pretty low and it is safer at night and safer for female travelers in Portugal than in most European countries. Both the risk of natural disasters and of terrorist attacks is extremely low.
As everywhere else around the world, empty, deserted or poorly lit streets are best avoided at night, especially in the largest cities, Lisbon and Porto. Also, Portugal is not a pickpockets-free country and attention should be paid in the usual places - train stations, airports, shopping areas and tourist-frequented areas.