I would like to know whether there is any difference in meaning if at all between "to write IN pen" and "to write WITH a pen"
Although to write with a pen and in pen mean more or less the same thing, I do draw a distinction.
Speaking generally, to write with something (where with indicates agency and not accompaniment) usually relates something about the writer, the writer's tools, or the writing process; I can write
- with a feather quill
- with a flourish
- with the memory still fresh in my mind
- with a dictionary & thesaurus and a Red Bull & vodka
To write in something (where in denotes a method or style, not location or position) is to describe some characteristic intrinsic to the writing itself:
- in cursive
- in Russian
- in blood
- in riddles
In is more exclusive; to say I write with metaphors means you employ metaphors in your writing, whereas to say I write in metaphors means your writing is characterized by the use of metaphors (or even universally comprised of metaphors). To say I write with Latin words similarly means you include Latin words in your writing; to say I write in Latin words means you use Latin words to the exclusion of any others.
I would say that in is more common in expressions, e.g. something written
- in stone — utterly immutable (more often set, carved, or etched in stone): There will be absolutely no extensions; the deadline is set in stone.
- in Greek — incomprehensible: IKEA may be Swedish, but these instructions are written in Greek.
- in crayon — amateurish, shoddy, or primitive, as if produced by children. This sales proposal is written in crayon.
- in blood — created, enforced, or characterized by violence or death or the threat of something equally serious: The history of modern Europe is written in blood.
- in pen (or, as StoneyB notes, more commonly in ink) — permanent, in contrast to something written in pencil which can be or is even expected to be changed. The new appointments are written in ink; after the 1st, you'll need executive approval to change them. (while written in ink has always been far more popular than written in pen, the latter usage is not unknown)
It is not unheard of in English to use the phrase "write in pen" to mean "write in ink with a pen." One example comes from John Updike, "Rhyming Max," from Assorted Prose (1965),
Beneath it, he [Max Beerbohm] wrote in pen:
This plain announcement, nicely read,
The effortless a-b-a-b rhyming, the balance of "plain" and "nicely," the need for nicety in pronouncing "Iambically" to scan—this is quintessential light verse, a twitting of the starkest prose into perfect form, a marriage of earth with light, and quite magical. Indeed, were I a high priest of literature, I would have this quatrain made into an amulet and wear it about my neck, for luck.
An earlier instance that a Google Books search finds is from American Law Reports Annotated (1942) [combined snippet]:
The grantors in the case at bar used a printed form deed and wrote in pen, after the words "warrant and defend," "except against said lease." If Morgan Allen and wife were not conveying the whole of the northeast one- quarter (1/4) there would be no necessity for adding these words "except against said lease," because the lease was not on the premises conveyed.
And earlier still is this example from Factory Management and Maintenance, volume 96 (1938) [snippet]:
While the standard "Speedial" is calibrated in turns of the shifting screw, space is available on the dial for the user to write in pen or pencil his own calibrations in whatever units he prefers. May be substituted for the standard hand- wheel, handcrank, or handwheel-type speed indicator on the company's units already in service. Reeves Pulley Co., Columbus, Ind.
But the expression "write in pen" seems to be a shortened form of "write in pen and ink" (all of the earliest occurrences—and there are more than a few of them, going back to 1894—of "write in pen" and "wrote in pen" in Google Books searches appear as part of the longer phrase "write [or wrote] in pen and ink"), and "pen and ink" makes a nice parallel with "pencil" (which combines the wooden case corresponding to the pen and the graphite medium corresponding to the ink).
Still, as StoneyB observes "write in ink" is the common way to express this idea. It is also older than any formulation of "write in pen," going back at least to 1826 in Google Books search results.
You might expect from the language's preference for the pairing of "write with a pen" and "write in ink" that "write with a pencil" and either "write in graphite" or "write in lead" would be favored as well. But instead, English speakers prefer "write with a pencil" and "write in pencil." The only Google Books matches for "wrote in lead" are as part of the longer phrase "wrote in lead pencil," and there are no Google Books matches for "wrote in graphite" at all.