If you've been properly served with a subpoena, it's a court order to appear on the date and time on the subpoena. Ignoring it can only end up badly for you - the court could issue a warrant for your arrest for disobeying the subpoena.
You may have had an option to write a statement for use in the investigation, but if the case is going to trial, they would need your actual attendance and testimony.
The best I can suggest is that you contact whoever subpoenaed you and see if they can excuse you for any reason.
It's not an invitation, it's a subpoena, and ignoring it or trying to get out of it is a bad idea that could subject you to contempt prosecution and a bench warrant.
You should do your civic duty by being a witness, just as you'd want some bystander to do the same for you if you needed a witness in some case you were involved in.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.