Use a capital letter for the architectural style and for corporate or governmental bodies that use the word as part of their formal names. For example,
- I visited the Federal Communications Commission.
Lowercase when used as an adjective to distinguish something from state, county, city, town, or private entities. For example,
- federal assistance
- federal court
- the federal government
- a federal judge
Also,
- federal District Court (U.S. District Court is preferred)
- federal Judge Ann Aldrich (U.S. District Judge Ann Aldrich is preferred)