Patriotism is a virtue, and like any virtue, can be contrasted with vices of excess and of deficiency. In excess, in consistently supporting the leadership even in wrongdoing, or in idolizing the state above God; in deficiency in resisting the due honor and obedience deserved by the country's rulers.
Love of country is a good thing. But what kind of love? Agape love is the selfless giving of oneself for another; while this is admirable when directed towards one's family, friends, or neighbor, this may approach idolatry when applied too strongly to the State itself. Eros love, or the love of desire, is perhaps an inappropriate love of country, if that is the sole love you have for it: “I love my country only when it gives me something” is at best childish. Rather we should look to the love of friendship — “we are all in this together and we have a common goal”; and also perhaps the love of affection — “I love my country because it is mine, not only because its goodness, and despite its flaws.”
Our duties to our country are largely based on the principle of justice, and closely related is the principle of piety, which extends beyond just worship due to God, but also our relationships with our family and the state.
According to the Catholic Encyclopedia entry on Civil Allegiance:
By civil allegiance is meant the duty of loyalty and obedience which a person owes to the State of which he is a citizen. The word allegiance is a derivative of liege, free, and historically it signifies the service which a free man owed to his liege lord. In the matter in hand its meaning is wider, it is used to signify the duty which a citizen owes to the state of which he is a subject.From the Catechism of the Catholic Church, section on the duties of citizens:
That duty, according to the teaching of the Catholic Church, rests on nature itself and the sanctions of religion. As nature and religion prescribe to children dutiful conduct towards the parents who brought them into the world, so nature and religion impose on citizens certain obligations towards their country and its rulers. These obligations may be reduced to those of patriotism and obedience. Patriotism requires that the citizen should have a reasonable esteem and love for his country. He should take an interest in his country's history, he should know how to value her institutions, and he should be prepared to sacrifice himself for her welfare. In his country's need it is not only a noble thing, but it is a sacred duty to lay down one's life for the safety of the commonwealth. Love for his country will lead the citizen to show honour and respect to its rulers. They represent the State, and are entrusted by God with power to rule it for the common good. The citizen's chief duty is to obey the just laws of his country.
2238 Those subject to authority should regard those in authority as representatives of God, who has made them stewards of his gifts: “Be subject for the Lord's sake to every human institution. . . . Live as free men, yet without using your freedom as a pretext for evil; but live as servants of God.” (1 Peter 2:13,16) Their loyal collaboration includes the right, and at times the duty, to voice their just criticisms of that which seems harmful to the dignity of persons and to the good of the community.See also the section on SAFEGUARDING PEACE, which discusses the legitimate use of the military to safeguard peace, and also the obligation to avoid war.
2239 It is the duty of citizens to contribute along with the civil authorities to the good of society in a spirit of truth, justice, solidarity, and freedom. The love and service of one's country follow from the duty of gratitude and belong to the order of charity. Submission to legitimate authorities and service of the common good require citizens to fulfill their roles in the life of the political community.
2240 Submission to authority and co-responsibility for the common good make it morally obligatory to pay taxes, to exercise the right to vote, and to defend one's country:
Pay to all of them their dues, taxes to whom taxes are due, revenue to whom revenue is due, respect to whom respect is due, honor to whom honor is due. (Romans 13:7)The Apostle exhorts us to offer prayers and thanksgiving for kings and all who exercise authority, “that we may lead a quiet and peaceable life, godly and respectful in every way.” (1 Timothy 2:2)
[Christians] reside in their own nations, but as resident aliens. They participate in all things as citizens and endure all things as foreigners. . . . They obey the established laws and their way of life surpasses the laws. . . . So noble is the position to which God has assigned them that they are not allowed to desert it. (Epistola Ad Diognetum 5:5)
War is a terrible thing, and besides just remembering or memorializing those fallen in service, perhaps we can offer up a prayer for their repose.