Limitations when in uniform.
Currently, the Federal Hatch Act prohibits Soldiers from making political speeches, attending rallies or taking on official roles in campaigns while in uniform. Additionally, Department of Defense Directive (DODD) 1344.10, entitled, "Political Activities by Members of the Armed Forces," prohibits members of the mil?itary from: [P]articipating in several forms of partisan political activities, including using their official authority to influence an election or solicit votes or monetary contributions for a candidate; marching in a partisan political parade; and publicly displaying partisan political posters at the service member's military quarters.
Political rights out of uniform.
It is fine to engage in politics when out of uniform, so long as you do not use your military title or status to endorse or support politicians. This goes for Social Media as well (e.g., Twitter, Facebook, Linked-in, MySpace, etc.).