All service members are encouraged to vote. You can make donations. You can attend political functions, but not in uniform.
Here the Marine Times points out that there are some considerations and limits on political activity.
DoDD 1344.10.
In short, you are barred from doing online what you can’t do in person. Sgt. Gary Stein, a meteorologist with 1st Intelligence Battalion at Camp Pendleton, Calif., was warned by superiors in the spring that his work to launch the “Armed Forces Tea Party Patriots” group on Facebook came close to violating DoD political speech guidelines.
You can still express an opinion.
Write a letter to the editor of a newspaper expressing the member’s personal views on public issues or political candidates, if such action is not part of an organized letter-writing campaign or a solicitation of votes for or against a political party or partisan political cause or candidate. If the letter identifies the member as on active duty (or if the member is otherwise reasonably identifiable as a member of the Armed Forces), the letter should clearly state that the views expressed are those of the individual only and not those of the Department of Defense (or Department of Homeland Security for members of the Coast Guard).
Here’s one that comes up from time to time with inappropriate bumper sticker scrapings dictated by the MP’s. You can:
Display a political bumper sticker on the member’s private vehicle.