Note: this is how to change the logical file name of a database file. To change the physical location of a database file, see How to Move a Database File.
I've had a couple of databases hanging around that have very bad logical file names. They were supposed to be test databases, but grew to be production databases (there is a law about this: there is no such thing as a prototype...)
I found a simple piece of code for how to change the names of these logical files:
alter database MyDatabase modify file (name='test', newname='MyDatabase')
alter database MyDatabase modify file (name='test_log', newname='MyDatabase_log')
This allows me to follow my naming convention and neot have to explain to the next guy why my database has logical file names that are animal names.