Dear Mom, your 8 year-old daughter's behavior is not age-appropriate. Taking her at her word, let's assume she was just "trying to make you laugh." Pulling down Mom's pajamas is an immature way to strike humor. On the other hand, your husband scolding her and sending her to take a shower is harsh, shaming, and negatively impacts her developing self-esteem.
It is quite possible that your daughter is curious about bodies and nudity. Still, it is not good for her to take away a permissive message from you.
Bottom line, this is a boundary issue. Both you and your husband need to be on the same page. Clearly tell your eight-year-old that bodies are private. No one should touch or see hers, or yours. Tell her it is normal and natural to be curious about what bodies look like without clothes. She has already seen Mommy naked and knows what Mom looks like so she does not need to continue this immature behavior.
Offer her acceptable ways she can make you laugh. She can tell you a funny story or say, "Look at me, Mom", if she wants your attention. Firmly add, "No more pulling down pajamas."
Tell your husband that is enough. No need to send her to shower which risks her feeling dirty and ashamed of what is likely simply immature behavior.