Pokemon came before Digimon. The conceptualization of Pokemon predates the conceptualization of Digimon, the game release of Pokemon predates the game release of Digimon, and the anime broadcast date of Pokemon predates the anime film release of Digimon. The Digimon game release happened after the Pokemon anime had started airing.
The details:
Pokemon was conceptualized by 田尻智 (Satoshi Tajiri). He came up with 『ゲームフリーク』(GAME FREAK) as a doujin (self-published) print magazine in 1983 in cooperation with 杉森建 (Sugimori Ken), and the first game produced by GAME FREAK was 『クインティ』 (Quinty, known as Mendel Palace in English) on June 27th, 1989. Using the earnings from this game, GAME FREAK became its own company under the name 株式会社ゲームフリーク (Kabushiki Gaisha Geemu Furiiku) on April 26th, 1989 under Tajiri, Sugimori, and 増田順一 (Masuda Junichi). GAME FREAK intended to begin production of Pokemon as soon as it commenced operation in 1989, but due to a variety of interruptions, the game was not completed and released until 1996 (in the meantime, GAME FREAK released other games).
Pokemon was finally released as an RPG-style video game for Nintendo's Game Boy on February 27th, 1996, by the team of Tajiri, Sugimori, Masuda, 森本茂樹 (Morimoto Shigeki, who appears in some of the games as a non-playable character), 藤原基史 (Fujiwara Motofumi), 太田健程 (Oota Takenori), and 渡辺哲也 (Watanabe Tetsuya). This was 『ポケットモンスター 赤・緑』 (Pocket Monster Red・Green.『ポケットモンスター 青』[Blue] was released October 15th, 1996). The TV anime started to be broadcast on April 1st, 1997.
ウィズ (WiZ Co., Ltd.) toy manufacturer and バンダイ (BANDAI Co., Ltd.) produced たまごっち (Tamagotchi) keychain digital pet game together and released it on November 23rd, 1996. Maita Aki, a BANDAI employee has been credited with coming up with it, saying in an interview that she "hatched the idea for a virtual pet about a year ago while watching a television commercial about a little boy who insisted on taking his turtle to kindergarten" (the date of the interview is not mentioned, but the article records, "Last October, Maita took Tamagotchi prototypes to the streets of Tokyo's Shibuya district for a consumer test. . . . By November, the Tamagotchi was on the market in Japan"). She says,
. . . it wasn't my accomplishment alone. I only came up with the idea, developed the concept and took charge of the marketing program. It also took a technician and public relations person to make it into a product . . .
Alternately, in an interview asking how he came up with the idea of Tamagotchi, WiZ's Yokoi Akihiro takes credit for its conceptualization, saying
Aquarium fish simulation was popular software back in ‘93 and ‘94 in Japan. However, (the) personal computer itself was not popular within the Japanese community (at) that time. Personally, I love all sorts of animals, so I was trying to create a toy which gives users a chance to raise their own pet, a toy that owners will enjoy the process (of) and feel empathy with their pet.
When I was working in Bandai, the leading toy maker, one of my roles was to develop handheld games, and among all those LCD handheld games that I created, I chose to focus on virtual pet handheld(s).
Digimon was conceptualized in 1996 as a simple Tamagotchi-style raising-monsters-as-digital-pets game and released by the same pair of companies as the 『デジタルモンスター』(Digital Monster) cell phone game on June 26th, 1997. The copyright is held by a 擬人名称, a.k.a. ハウスネーム (kijin meishou or "housename" --- that is, a non-human entity given a personified name) called 本郷あきよし (Hongo Akiyoshi) but is owned jointly by WiZ and BANDAI. Most of the character designs for Digimon were by 渡辺けんじ (Watanabe Kenji), ボルケーノ太田 (Oota Volcano), and 北川原真 (Kitagawa [not sure of romanization of his/her first name]). An anime theatrical film titled 『デジモンアドベンチャー』(Digimon Adventure) was released on March 6th, 1999 and then the TV anime of the same name started to be broadcast on March 7th, 1999.