It depends. Most features/solutions written for SharePoint 2007 should work fine in 2010 unless there was functionality that was only available in 2007. Depending on your environment, if solutions are required to run as a sandbox solution in 2010, then there may be things in your feature that will not work. There is a ton of information available to look at about sandbox solutions if that applies to you. Here is a starting point that may help.
The best way to find out for sure if your feature will work moving from 2007 to 2010 is to test it in a development environment such as a local VM. A good test plan with associated test cases will help in your determination if it is working correctly.